﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Đăng nhập hệ thống</title>
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <script type="text/javascript" src="js/jquery-1.11.0.js"></script>
</head>
<body>

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div style="" class="main">
            <div class="main_top">
            </div>
        </div>
        <table style="width: 100%; height: 100%; margin-top: 100px;">
            <tr>
                <td valign="middle" align="center">
                    <div class='login'>
                        <div class='header'>
                            <LIB:tieude runat="server" ID="tieude" Text="Đăng nhập hệ thống"></LIB:tieude>
                        </div>
                        <div class='content'>
                            <div class="left">Mã NSD: </div>
                            <div class="right">
                                <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
                            </div>
                            <div class="clear"></div>
                            <div class="left">Mật khẩu: </div>
                            <div class="right">
                                <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                            </div>
                            <div class="clear"></div>
                            <div class="left">
                                <asp:Button ID="btLogin" Style="margin-left: 105px;" runat="server" Text="Đăng nhập" OnClientClick="return login();" />
                            </div>
                            <div class="clear"></div>
                            <div style='float: right; margin-right: 10px; line-height: 40px;'><a href="Quenmatkhau.aspx">Quên mật khẩu?</a></div>
                            <div class="clear"></div>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <script type="text/javascript">

            function login() {
                try {                   
                    var b_user = $("#<%=txtUserName.ClientID%>").val();
                    var b_pass = $("#<%=txtPassword.ClientID%>").val();
                    wht.Fs_LOGIN(b_user, b_pass, Fs_login_P_KQ, P_LOI_CSDL, P_LOI_TGIAN);
                    return false;
                }
                catch (err) {
                    form_P_LOI(err);
                }
            }
            function Fs_login_P_KQ(b_kq)
            {
                if (Fb_LOI_KTRA(b_kq)) {
                    form_P_LOI(b_kq);
                    return;
                }
                else {
                    var b_tenf="<%=this.ResolveUrl("~/Menu.aspx")%>";
                    window.location.assign(b_tenf);
                }
            }
        </script>
    </form>
</body>
</html>
